package com.huishi.util;

import lombok.extern.slf4j.Slf4j;

import java.util.Date;
import java.util.Map;

@Slf4j
public class DataXUtils {

    private static final String DATA_X_BIN = "E:\\myDevApp\\datax\\bin\\datax.py";
    private static final String JOB_PATH = "E:\\ljl\\data-tool\\jobs\\";

    public static boolean executeJob(String jobName, Date startTime) {
        String command = String.format("python %s %s", DATA_X_BIN, JOB_PATH + jobName + ".json");
        return CMDUtils.executiveDataX(command, jobName, startTime);
    }
}
